<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      /*
        1. 所有属性和方法都是基于原型链查找
        2. 在任意原型对象上如果查找到属性方法，终止原型链查找
      */
      const a = {
        money: 1000,
      };
      const b = {
        __proto__: a,
      };
      const c = {
        money: 500,
        __proto__: b,
      };
      const d = {
        money: 5,
        __proto__: c,
      };
      console.log(d.money);
    </script>
  </body>
</html>
